SD_2 = data(1:end,2);
SD_2 = SD_2 - mean(SD_2);

%SD_2=x;

% hw=hann(20000);
nfft=size(SD_2,1);
kw=kaiser(nfft,20);
%f=fft(SD_2,500);
fs=8000e6;
b=15e6;

p=pwelch(SD_2,kw,[],nfft,fs);
xs = linspace(1,fs/2,size(p,1));
loglog(xs,p);

t=1/(b/nfft);
b2=b/(fs/nfft);

xf = round(size(p,1)/4000);
signal=sum(p(xf-4:xf+4)) % signal
noise=sum(p(round(size(p,1)/4000)-31:round(b2)))-signal % noise
10*log10(signal/noise)


% 3.3333e-005